package bf.util;
import java.io.UnsupportedEncodingException;


public class ObjectBF implements BFProgram {

	public byte[] cell = new byte[65536];
	public int pointer = 0;
	
	public void run() {}
	
	public void OC() {
		outASCII(cell[pointer]);
	}
	public void PADD(int value){
		pointer += value;
	}
	public void CADD(int value){
		cell[pointer] += value;
	}
	public void CLR(){
		cell[pointer] = 0;
	}
	public static void outASCII(byte c) {
		byte[] b = {c};
		try {
			String str = new String(b, "ASCII");
			System.out.print(str);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
